package com.heima.article.controller.v1;


import com.atheima.apis.article.saveArticle;
import com.heima.article.service.ApArticleService;

import com.heima.model.article.dtos.articleDto;
import com.heima.model.common.dtos.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.io.IOException;

@RestController
public class ArticleClient implements saveArticle {

    @Autowired
    private ApArticleService apArticleService;
    @Override
    @PostMapping("/api/v1/article/save")
    public ResponseResult saveArticle(@RequestBody articleDto articledto) {
        return apArticleService.saveArticle(articledto);
    }
}